---
-- @param self
-- @param event
-- @return
local function modal(self, event)
    if event.action == "touch.ended" then
        self:dispatchEvent{name="touched"}
        
        local motion = require "script.motion"
        motion.clean(self.BodyTextShadow)
        motion.clean(self.BodyText)
        motion.clean(self.AlertTextShadow)
        motion.clean(self.AlertText)
        
        self:removeSelf()
        self = nil
    end
end

---
-- @param params
-- @return
return function()
    local self = display.newGroup();
    
    self.Modal = require "script.modal" (0)
    self:insert(self.Modal)
    
    self.BodyTextShadow = display.newText(self, "Merke dir die Karten!", 0, 0, native.systemFont, 18);
    self.BodyTextShadow:setTextColor(0, 0, 0)
    self.BodyTextShadow:setReferencePoint(display.tc)
    self.BodyTextShadow.x = centerX
    self.BodyTextShadow.y = 10
    self:insert(self.BodyTextShadow)
    
    local motion = require "script.motion"
    motion.ExplodeIn(self.BodyTextShadow, 400, 400)
    
    self.BodyText = display.newText(self, "Merke dir die Karten!", 0, 0, native.systemFont, 18);
    self.BodyText:setTextColor(255, 199, 0)
    self.BodyText:setReferencePoint(display.tc)
    self.BodyText.x = centerX
    self.BodyText.y = 10
    self:insert(self.BodyText)
    
    local motion = require "script.motion"
    motion.ExplodeIn(self.BodyText, 400, 400)
    
    self.AlertTextShadow = display.newText(self, "Drücke den Bildschirm um weiterzumachen", 0, 0, native.systemFont, 14)
    self.AlertTextShadow:setTextColor(255, 255, 255)
    self.AlertTextShadow:setReferencePoint(display.tc)
    self.AlertTextShadow.x = centerX + 1
    self.AlertTextShadow.y = self.BodyText.y + self.BodyText.height + 1
    self:insert(self.AlertTextShadow)
    motion.Pulse(self.AlertTextShadow, 600, 0.2, 1)
    
    self.AlertText = display.newText(self, "Drücke den Bildschirm um weiterzumachen", 0, 0, native.systemFont, 14)
    self.AlertText:setTextColor(0, 0, 0)
    self.AlertText:setReferencePoint(display.tc)
    self.AlertText.x = centerX
    self.AlertText.y = self.BodyText.y + self.BodyText.height
    self:insert(self.AlertText)
    motion.Pulse(self.AlertText, 600, 0.2, 1)
    
    self.Modal:addEventListener("Modal", function(event) modal(self, event) end)
    
    return self
end

